package com.xjj.controller.api;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.xjj.entity.Parent;
import com.xjj.entity.ResponseEntity;
import com.xjj.entity.Student;
import com.xjj.mapper.StudentMapper;
import com.xjj.service.ParentService;
import com.xjj.service.StudentService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author : 王泰元
 * @date : 2022/10/27 18:09
 */
@RestController
@RequestMapping("/manage/api/parent")
public class ApiParentController {

    @Resource
    ParentService parentService;


    @GetMapping("/login/{tel}")
    public ResponseEntity<Parent> login(@PathVariable String tel) {

        Parent parent = parentService.login(tel);
        return ResponseEntity.SUCCESS("ok", parent);
    }
}
